/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tax;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Home
 */
public class Tax {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        DanhSachHoSo doclist = new DanhSachHoSo();
        doclist.setVisible(true);
//        NewDocForm docform = new NewDocForm();
//        docform.setVisible(true);
//        try {
//            Conn.connect();
//            Statement stat = Conn.conn.createStatement();
////              stat.executeUpdate("drop table if exists people;");
////              stat.executeUpdate("create table people (name, occupation);");
//              PreparedStatement prep = Conn.conn.prepareStatement(
//                  "insert into DoanhNghiep values (?,?,?);");
//
//              prep.setString(1, "B12345");
//              prep.setString(2, "Cty TNHH TMDV Hai con gà");
//              prep.setString(3, "Số 10, Hùng Vương");
//              prep.addBatch();
//              prep.setString(1, "C12345");
//              prep.setString(2, "Cty TNHH TMDV Ba con gà");
//              prep.setString(3, "Số 100, Hồng Bàng");
//              prep.addBatch();
//              
//              Conn.conn.setAutoCommit(false);
//              prep.executeBatch();
//              Conn.conn.setAutoCommit(true);
//        
//              ResultSet rs = stat.executeQuery("select * from DoanhNghiep;");
//        while (rs.next()) {
//            System.out.println("MST = " + rs.getString("Masothue"));
//            System.out.println("Ten = " + rs.getString("TenDoanhNghiep"));
//        }
//        rs.close();
//        Conn.conn.close();
//        } catch (SQLException ex) {
//            Logger.getLogger(Tax.class.getName()).log(Level.SEVERE, null, ex);
//        }
    }
}
